package r21118d1119nw;

public class Person {
    String name;
    String id;

    public Person() {
    }

    public Person(String name, String id) {
        this.name = name;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    @Override
    public boolean equals(Object obj) {
        Person p =(Person) obj;
        if(this.name.equals(p.name) && this.id.equals(p.id)){
            return false;
        }else{
            return true;
        }

    }

    public static void main(String[] args) {
        Person p1 = new Person("zhangsan","123456789");
        Person p2 = new Person("zhangsan","987654321");
        System.out.println(p1.equals(p2));
    }
}
